package gui.sidebar.transactions;

import queped.quepedconstants.Strings;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;

/**
 * Created by IntelliJ IDEA.
 * User: Jason Ye
 * Date: 31/01/2012
 * Time: 18:28

 */
public class TransactionContainerPanel extends JPanel {

    JButton evaluate;
    private ScrollableTransactionList transactionList;

    public TransactionContainerPanel(){

        //init transaction list
        transactionList=new ScrollableTransactionList();

        this.setMinimumSize(new Dimension(400,400));

        this.setBorder(BorderFactory.createTitledBorder(Strings.TRANSACTION));

        evaluate = new JButton("Evaluate");

        this.add(evaluate);
        this.add(transactionList);

    }

    public void addEvaluateButtonListener(ActionListener listener){

       evaluate.addActionListener(listener);

    }
}
